sample=$1
config_path=$2
capture_bed=$3
region_type=$4

source ${config_path}/config.sh

## 计算1x、10x、20x、30x、40x、50x、60x,70x,80x,90x,100x的区域的覆盖率
mkdir -p ${qc_path}/mosdepth_${region_type}

cd ${qc_path}/mosdepth_${region_type}

${mosdepth} -n --fast-mode --by ${capture_bed} \
-T 1,10,20,30,40,50,60,70,80,90,100 \
${sample} \
${bam_path}/${sample}-recal.bam \
2> ${log_path}/${sample}.${region_type}.mosdepth.log
